//
//  Item.h
//  CoreData-Demo
//
//  Created by zhaoguoteng on 2020/4/21.
//  Copyright © 2020 gaven. All rights reserved.
//

#import <CoreData/CoreData.h>

@class Item;

@interface Item : NSManagedObject

@property(nonatomic, strong) NSString *title;
@property(nonatomic, strong) NSNumber *order;
//@property(nonatomic, strong) Item *parent;
//@property(nonatomic, strong) NSSet *children;

+ (instancetype)insertItemWithTitle:(NSString *)title
                              order:(NSInteger)order
                             parent:(Item *)parent
             inManagedObjectContext:(NSManagedObjectContext *)context;

+ (NSString *)entityName;

@end
